package com.coocaa.x.service.litecontent.providers.store.host.com_coocaa_hall.data;

import com.coocaa.x.service.litedb.data.client.LiteDBSupport;

public class OperationMainPageData extends LiteDBSupport {
    // 应用、分类基本信息
    public String categoryid = "";
    public int id = 0;
    public String name = "";
    public String url = "";
    public String icon = "";
    public String type = ""; // 0：表示应用 1：表示分类

    // 应用详细信息
    public String pkg = "";
    public String mActivity = "";
    public String version = "";

    // 模块结构
    public String structure = ""; // 2*4 4*2 4*4 2*2

    public OperationMainPageData() throws Exception {
        super("operation_db", 1);
        // TODO Auto-generated constructor stub
    }

    public void setData(String categoryid, int id, String name, String url, String icon,
                        String type, String pkg, String mActivity, String version, String structure) {
        this.categoryid = categoryid;
        this.id = id;
        this.name = name;
        this.url = url;
        this.icon = icon;
        this.type = type;
        this.pkg = pkg;
        this.mActivity = mActivity;
        this.version = version;
        this.structure = structure;
    }

    public int getStructure_w() {
        String w = structure.substring(0, 1);
        return Integer.parseInt(w);
    }

    public int getStructure_h() {
        String h = structure.substring(1, 2);
        return Integer.parseInt(h);
    }

}
